#ifndef SERIALPORTTHREAD_H
#define SERIALPORTTHREAD_H

#include <QObject>
#include <QThread>
#include <QDebug>
#include <QSerialPortInfo>
#include <QSerialPort>

class serialportThread:public QObject
{
    Q_OBJECT;
public:
    explicit serialportThread(QObject *parent = nullptr);

public:
    void serialclose();
    void serialPortSend(QByteArray);

public slots:
    void run();
    void serialPortRead_Slot();

private:
    QSerialPort *serialPort;// 串口
    QThread thread;

};

#endif // SERIALPORTTHREAD_H
